import Vue from 'vue'
import App from './App.vue'

import * as API from '@/api'; // 引入接口文件

import router from '@/router' // 引入路由规则
import store from '@/store' // 引入仓库

import Vant from 'vant'; // 引人vant
import 'vant/lib/index.css'; // 引入样式

import 'amfe-flexible'
// 引入图标库
import './assets/fontawesome-free-5.15.1-web/css/all.min.css'
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText }
from '@fortawesome/vue-fontawesome'
library.add(fas, far, fab)
Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.component('font-awesome-layers', FontAwesomeLayers)
Vue.component('font-awesome-layers-text', FontAwesomeLayersText)

Vue.use(Vant); // 使用样式

Vue.config.productionTip = false

new Vue({
   router,
   store,
   beforeCreate() {
      //全局api请求
      Vue.prototype.$API = API;
   },
   render: h => h(App),
}).$mount('#app')